package com.hbk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hbk.entity.News;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsMapper extends BaseMapper<News> {

    /**后台分页查询新闻列表*/
    List<News> list(@Param("start")Integer start,
                    @Param("num")Integer num,
                    @Param("title")String title,
                    @Param("state")Integer state,
                    @Param("type")Integer type);

    /**后台分页查询新闻列表总数*/
    int countList(@Param("title")String title,
                  @Param("state")Integer state,
                  @Param("type")Integer type);


    /**
        获取已发布的新闻列表，按照序号正序，发布时间正序排序
     * */
    List<String> newsLogicOrder(@Param("start")Integer start,
                                 @Param("num")Integer num);
}
